<include file="Home/Public/Header" />
<link href="css/common.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="__CSS__/global.css">
<link href="__CSS__/global_new.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="__CSS__/Public.css">
<link rel="stylesheet" type="text/css" href="__CSS__/Personal.css">
<link rel="stylesheet" type="text/css" href="__CSS__/change.css">
<script type="text/javascript" src="__SCRIPT__/jquery-1.8.3.min.js"></script>
<style type="text/css">
.header {
	height:105px;
}
.size_selected {
	border:#f90 solid 1px;
	color:#f90;
	width:16px;
	height:16px;
	line-height:16px;
}
.cxFormtime {
	width: 69px;
	height:21px;
	margin-left:10px;
	background:url(images/sale/pecsonal_cx.png) no-repeat;
	border: medium none;
	cursor: pointer;
}

.downContent ul li {
	float:left;
	list-style-type:none;
}
.search_time_span {
	margin: 0 2px;
	background-color: #EFEFEF;
	border: 1px solid;
	padding: 4px;
}
.search_time_span_select {
	margin: 0 2px;
	background-color: #3D86EA;
	border: 1px solid #3D86EA;;
	padding: 4px;
	color: white;
}
.confirm_button {
	color: #fff;
	/*line-height: 1px;*/
    background: #06c;
	text-align: center;
	float: left;
	display: block;
	padding: 0 10px;
	text-decoration: none;
}
.downContent ul li {
	float:left;
	list-style-type:none;
}
.bail_notopeneds {
	background: #ffeaea;
	border: solid #ffabab 1px;
	padding: 10px;
	text-align: left;
	width:300px;
	margin-top:10px;
}
.sem-button {
	font-size:12px;
	cursor: pointer;
	display: inline-block;
	min-height: 1em;
	outline: 0;
	border: none;
	vertical-align: baseline;
	background: #E0E1E2;
	color: rgba(0, 0, 0, .6);
	font-family: Lato, 'Helvetica Neue', Arial, Helvetica, sans-serif;
	margin: 0 .25em 0 0;
	padding: 1px 6px;
	text-transform: none;
	text-shadow: none;
	font-weight: 700;
	line-height: 1em;
	font-style: normal;
	text-align: center;
	text-decoration: none;
 border-radius: .28571429rem;
	box-shadow: 0 0 0 1px transparent inset, 0 0 0 0 rgba(34, 36, 38, .15) inset;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
 -webkit-transition: opacity .1s ease, background-color .1s ease, color .1s ease, box-shadow .1s ease, background .1s ease;
 transition: opacity .1s ease, background-color .1s ease, color .1s ease, box-shadow .1s ease, background .1s ease;
	will-change: '';
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: button;
	font: inherit;
	letter-spacing: normal;
	word-spacing: normal;
}
.sem-button.primary {
	background-color: #2185D0;
	color: #FFF;
	text-shadow: none;
	background-image: none;
	box-shadow: 0 0 0 0 rgba(34, 36, 38, .15) inset;
}
.sem-button.primary:hover {
	background-color: #1678c2;
	color: #FFF;
	text-shadow: none;
}
.sem-button.orange {
	background-color: #F2711C;
	color: #FFF;
	text-shadow: none;
	background-image: none;
}
.sem-button.orange:hover {
	background-color: #f26202;
	color: #FFF;
	text-shadow: none;
}
.sem-button.large {
	padding: 6px 12px;
	font-siez:14px;
}
.site_list li .site_btn {
	display: inline-block;
	background: url('__IMAGE__/personal/tjxx.png') no-repeat;
	height: 28px;
	width: 85px;
	border:none;
	cursor: pointer;
}
.site_list li{position:relative}

input.error{border:red 1px solid; outline: none;}
label.error{
	position: absolute;
	left: 140px;
	color: red;
	text-align: left !important;
	display: block;
	width: 200px !important;
	top: 33px;
}

</style>

</head>
<body>

<!--头部开始--> 


<include file="Home/Public/top_box" />
<include file="Home/Public/Search" />


<!--头部结束--> 
<div class="clear"></div>
<div class="center yxlb">您的当前位置是：首页 - <span style="color:#3366cc">我的游戏卖</span></div>
<div class="clear"></div>
<div class="center"> 

  <include file="Home/Member/LeftBar" />
  <script type="text/javascript">
	var address = window.location.href.substring(window.location.href.lastIndexOf('/'));
	$('.personal_left ul li a').removeClass('global_a_hover');
	$.each($('.personal_left ul li'), function(i, item){
		var href = $(item).children('a').attr('href');
		href = href.substring(href.lastIndexOf('/'));
		if (address.indexOf(href) != -1) {
			$(item).children('a').addClass('global_a_hover');
		}
	});
</script>
  <div class="personal_right">
    <div class="ddgl">
			<h1>账户设置</h1>
			<div class="m10">
				<ul class="site_title">
					<li class="rad"><a href="/user/toChangePassword.action">修改登录密码</a></li>
				</ul>
				<form name="loginPasswordForm" id="loginPasswordForm" method="post" action="{:U('Home/Member/Passphrases')}">
					<ul class="site_list">
						<li>
							<label>当前密码：</label>
							<input type="password" id="oldPassword" name="oldPassword" maxlength="20" autocomplete="off">
						</li>
						<li>
							<label>新密码：</label>
							<input type="password" id="newPassword" name="member_newpassword" maxlength="20" autocomplete="off" ajaxvalidate="loginpass" placeholder="长度6-20位">
						</li>
						<li>
							<label>确认新密码：</label>
							<input type="password" id="newPassword1" maxlength="20" name="member_password"  placeholder="长度6-20位">
						</li>
						<li>
							<label>验证码：</label>
							<input type="text" id="img_valid" name="img_valid" style="vertical-align: top;" maxlength="4" desc="验证码">&nbsp;&nbsp;<img src="{:U('Home/Api/VerifyCode')}" onclick="this.src=this.src+'?'+Math.random()" width="150" height="30" class="codeImg middle" alt="请输入验证码">
						<input type="hidden" id="ymid" name="ymid" value="0">
						</li>
						<li class="label"><input id="hlkOK" class="site_btn" value="" type="submit" /></li>

					</ul>
				</form>
			</div>
		</div>
  </div>
</div>
<div class="clear"></div>
<include file="Home/Public/footer" />
<script src="__SCRIPT__/jquery.form.min.js"></script>
<script type="text/javascript">
	$(function(){
		$.validator.addMethod("password", function(value) {
			var v = $.trim(value);
			var preg = /^(?![^a-zA-Z]+$)(?!\D+$).{6,20}$/;
			return preg.exec(value) ? true : false;
		}, "密码由6-20位字符组成，需同时包含字母和数字");


		$("#loginPasswordForm").validate({
			rules: {
				oldPassword: {
					required: true,
					password: true,
					remote:{
						type: 'POST',
						url: "{:U('Home/Api/isOldPass')}",
						data: {
							pass: function() {
								return $("#oldPassword").val();
							}
						}
					}
				},
				member_newpassword: {
					required: true,
					password: true,
					remote:{
						type: 'POST',
						url: "{:U('Home/Api/isDifferentFromOldPass')}",
						data: {
							pass: function() {
								return $("#newPassword").val();
							}
						}
					}
				},
				member_password: {
					required: true,
					password: true,
					equalTo: "#newPassword"
				},
				img_valid: {
					required: true,
					remote: {
						type: 'POST',
						url: "{:U('Home/Api/CheckVerifyCode')}",
						data: {
							img_valid: function() {
								return $("#img_valid").val();
							}
						}
					}
				}
			},
			messages: {
				oldPassword: {
					required: '请输入旧密码',
					password: '密码由6-20位字符组成，需同时包含字母和数字',
					remote: "当前密码不正确，请重新输入"
				},
				member_newpassword: {
					required: '请输入新密码',
					password: '密码由6-20位字符组成，需同时包含字母和数字',
					remote: "新密码不能与旧密码一样"
				},
				member_password: {
					required: '请再次确认您输入的新密码',
					password: '密码由6-20位字符组成，需同时包含字母和数字',
					equalTo: '您两次输入的密码不一样，请重新输入'
				},
				img_valid: {
					required: '请输入验证码',
					remote: '验证码不正确，请重新输入'
				}
			}
		})
})

</script>
</body>
</html>